
#ifndef __STAGE_MANAGER_H__
#define __STAGE_MANAGER_H__

#include "Defines.h"
#include "cBackGroundScroller.h"

namespace nStageFormat01
{
	struct sStage;
}

class cLogicManager;
class cBackGroundScroller;

struct sStageManagerDesc
{
	sStageManagerDesc()
	{
		parent = NULL;
		logicManager = NULL;
	}

	CCNode* parent;
	cLogicManager* logicManager;
};

class cStageManager
{
public:
	cStageManager();
	~cStageManager();

	void Init(const sStageManagerDesc& desc);
	void Update(float dt);

	void Start(tInt stageID);
	void Stop();

private:
	CCNode* m_parent;
	cLogicManager* m_logicManager;

	tBool m_start;
	tInt m_stageID;
	tInt m_timeLineIndex;
	cTimeCounter m_stageTimer;
	cTimeCounter m_stageDelayTimer;
	const nStageFormat01::sStage* m_stageData;

	cBackGroundScroller m_skyScroller;
	cBackGroundScroller m_mountainScroller;
	cBackGroundScroller m_groundScroller;
};



#endif // __STAGE_MANAGER_H__